<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/11/21
 * Time: 19:07
 */
namespace phpfuntions\mp_net;
class myphp_http
{

    /**
     * header 函数：发送一个原始HTTP标头
     * @access public
     * @return
     */
    public static function header ($string, $replace = true, $http_response_code = null) {
        return header( $string, $replace , $http_response_code );

    }

    /**
     * headers_list 函数：返回已发送(或准备发送) 的响应标头的列表
     * @access public
     * @return
     */
    public static function headers_list () {
        return headers_list( );

    }

    /**
     * headers_sent 函数：检查标头是否已被发送以及在哪里被发送
     * @access public
     * @return
     */
    public static function headers_sent (&$file = null, &$line = null) {
        return headers_sent( $file , $line );

    }

    /**
     * setcookie 函数：发送一个Cookie信息
     * @access public
     * @return
     */
    public static function setcookie ($name, $value = "", $expire = 0, $path = "", $domain = "", $secure = false, $httponly = false) {
        return setcookie($name, $value , $expire, $path , $domain , $secure , $httponly  );

    }

    /**
     * setrawcookie 函数：发送一个其值未经urlencode编码的Cookie
     * @access public
     * @return
     */
    public static function setrawcookie ($name, $value = null, $expire = 0, $path = "", $domain = "", $secure = false, $httponly = false) {
        return setrawcookie($name, $value , $expire, $path , $domain , $secure , $httponly  );

    }
}